package com.lhkj.ct.meta.modules.questionnaire.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lhkj.ct.base.enums.DeleteStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Tolerate;

import java.io.Serializable;
import java.sql.Time;
import java.time.LocalDateTime;

/**
 * <p>
 * 问卷分配记录
 * </p>
 *
 * @author jobob
 * @since 2023-10-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TblQnrAllotRecord对象", description="问卷分配记录")
@Builder
public class TblQnrAllotRecord implements Serializable {

    @Tolerate
    public TblQnrAllotRecord() {
    }

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "分配记录id")
    private String id;

    @ApiModelProperty(value = "档案id")
    private String patId;

    @ApiModelProperty(value = "问卷id")
    private String qnrId;

    @ApiModelProperty(value = "是否匿名")
    private Boolean anonymous;

    @ApiModelProperty(value = "分配人")
    private String createBy;

    @ApiModelProperty(value = "分配时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "删除状态 1.是 0.否")
    private DeleteStatus delFlag;

    // ==============================================================

    @TableField(exist = false)
    @ApiModelProperty(value = "作答状态", notes = "-1.未作答 0.作答中 1.已完成")
    private Integer status;

    @TableField(exist = false)
    @ApiModelProperty(value = "姓名")
    private String patName;

    @TableField(exist = false)
    @ApiModelProperty(value = "性别")
    private String patSex;

    @TableField(exist = false)
    @ApiModelProperty(value = "年龄")
    private Integer patAge;

    @TableField(exist = false)
    @ApiModelProperty(value = "问卷名称")
    private String qnrName;

    @TableField(exist = false)
    @ApiModelProperty(value = "报告id")
    @JsonIgnore
    private String rId;

    @TableField(exist = false)
    @ApiModelProperty(value = "作答记录")
    @JsonIgnore
    private String answerJson;

    @TableField(exist = false)
    @JsonIgnore
    @ApiModelProperty(value = "计时")
    private Time costTime;

}
